﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using YArchitech.LIB;
using YArchitech.LIB.YJKControls;

namespace HYRElectric.WirePlace
{
	public partial class DlgModifyConduitLevel : System.Windows.Forms.Form
	{
		public DlgModifyConduitLevel()
		{
			this.InitializeComponent();
		}

		public DlgModifyConduitLevel(double level)
		{
			this.InitializeComponent();
			this.txtHeight.Text = Math.Round(level, 1).ToString();
		}

		private void DlgModifyConduitLevel_Load(object sender, EventArgs e)
		{
			//base.Icon = Resource.YArchitechIcon;
		}

		private void txtHeight_KeyPress(object sender, KeyPressEventArgs e)
		{
			Common.IsDouble(e, this.txtHeight);
		}

		private void btnOk_Click(object sender, EventArgs e)
		{
			if (Common.CheckValue(this.txtHeight, "相对标高"))
			{
				base.DialogResult = DialogResult.OK;
			}
		}
	}
}
